<template>
  <cfDialog :dialogObj='dialogObj'>
    <div slot='content' v-loading='loading'>
      <el-form ref="form" :model="form" label-width="80px" size="mini">
        <el-row>
          <el-col :span="24">
            <el-form-item label="日志序号">{{ form.jobLogId }}</el-form-item>
            <el-form-item label="任务名称">{{ form.jobName }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="任务分组">{{ form.jobGroup }}</el-form-item>
            <el-form-item label="执行时间">{{ form.createTime }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="调用方法">{{ form.invokeTarget }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="日志信息">{{ form.jobMessage }}</el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="执行状态">
              <div v-if="form.status == 0">正常</div>
              <div v-else-if="form.status == 1">失败</div>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="异常信息" v-if="form.status == 1">{{ form.exceptionInfo }}</el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </cfDialog>
</template>
<script>
export default {
  props: {
    dialogObj: {
      type: Object,
      default: ({
        visible: false,
        type: '',
        id: '',
        title: '',
        width: '520px'
      })
    }
  },
  data() {
    return {
      form: {},
    }
  },
  mounted() {
    this.form = this.dialogObj.params;
  },
}
</script>